#
# Cmake instructions file
#
cmake_minimum_required(VERSION 2.8)
 
project(ToolChains NONE)

install(DIRECTORY toolchains DESTINATION ${CMAKE_ROOT}/Modules/SBE USE_SOURCE_PERMISSIONS PATTERN .svn EXCLUDE)
install(DIRECTORY scripts DESTINATION ${CMAKE_ROOT}/Modules/SBE/toolchains USE_SOURCE_PERMISSIONS PATTERN .svn EXCLUDE)

configure_file(shellScripts/sbeListToolchains.in "${PROJECT_BINARY_DIR}/sbeListToolchains" @ONLY)
install(FILES "${PROJECT_BINARY_DIR}/sbeListToolchains" 
        DESTINATION /usr/local/bin 
        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
configure_file(shellScripts/sbeToolchainSpecForEclipse.in "${PROJECT_BINARY_DIR}/sbeToolchainSpecForEclipse" @ONLY)        
install(FILES "${PROJECT_BINARY_DIR}/sbeToolchainSpecForEclipse" 
        DESTINATION /usr/local/bin 
        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)        